package main

import "fmt"

func main() {
	var profit float64 = 0.0
	var pay float64 = 0.0

	fmt.Print("请输入利润: ")
	fmt.Scanf("%f\n", &profit)

	switch {
	case profit > 1000000:
		pay = (profit - 1000000) * 0.01
		profit = 1000000
		fallthrough
	case profit > 600000:
		pay += (profit - 600000) * 0.015
		profit = 600000
		fallthrough
	case profit > 400000:
		pay += (profit - 400000) * 0.03
		profit = 400000
		fallthrough
	case profit > 200000:
		pay += (profit - 200000) * 0.05
		profit = 200000
		fallthrough
	case profit > 100000:
		pay += (profit - 100000) * 0.075
		profit = 100000
		fallthrough
	default:
		pay += profit * 0.1
	}
	fmt.Printf("提成总计：%f\n", pay)
}
